openapi: 3.0.1
info:
  title: BIC - Council to ePlanning API
  description: >
    # Authentication    


    Please use the subscription key provided by the Department to access the
    APIs.
  contact: {}
  version: v1
servers:
  - url: https://api.apps1.nsw.gov.au/planning/onlineBIC/v1
paths:
  /AcceptReturn/{CaseID}:
    put:
      summary: AcceptReturn
      description: >
        This operation transfers the Council decision to accept or return the
        Building information Certificate case from the Council IT system to the
        Online Building information Certificate Service.
      operationId: put-acceptreturn-caseid
      parameters:
        - name: CaseID
          in: path
          description: A fully qualified application number or case id
          required: true
          schema:
            type: string
        - name: OrganisationID
          in: header
          description: >-
            The council LGA name or Private Certifier Organisation name to
            indicate where the request is originated from.
          required: true
          schema:
            type: string
      requestBody:
        description: Information request object
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/acceptReturn'
        required: true
      responses:
        '200':
          description: Case Accepted Successfully.
          content: {}
        '400':
          description: Invalid request supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Case not found or locked by another user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      deprecated: false
      x-codegen-request-body-name: body
  /Assessment/{CaseID}:
    put:
      summary: Assessment
      description: >-
        This operation transfers the Council assessment information on the
        Building information Certificate case from the Council IT system to the
        Building information Certificate Service.
      operationId: put-assessment-caseid
      parameters:
        - name: CaseID
          in: path
          description: A fully qualified application number or case id
          required: true
          schema:
            type: string
        - name: OrganisationID
          in: header
          description: >-
            The council LGA name or Private Certifier Organisation name to
            indicate where the request is originated from.
          required: true
          schema:
            type: string
      requestBody:
        description: Information request object
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/assessment'
        required: true
      responses:
        '200':
          description: Assessment Created sucessfully
          content: {}
        '400':
          description: Invalid request supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Case not found or locked by another user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      deprecated: false
      x-codegen-request-body-name: body
  /InitiateInspection/{CaseID}:
    post:
      summary: InitiateInspection
      description: >-
        This operation transfers the council's initial inspection information on
        the Building Information Certificate case from the council's IT system
        to the Online Building Information Certificate Service.
      operationId: post-initiateinspection-caseid
      parameters:
        - name: CaseID
          in: path
          description: A fully qualified application number or case id
          required: true
          schema:
            type: string
        - name: organisationID
          in: header
          description: >-
            The council LGA name or Private Certifier Organisation name to
            indicate where the request is originated from.
          required: true
          schema:
            type: string
      requestBody:
        description: Information request object
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/initiateInspection'
        required: true
      responses:
        '200':
          description: CaseID--XXX created Sucessfully.
          content: {}
        '400':
          description: Invalid request supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Case not found or locked by another user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      deprecated: false
      x-codegen-request-body-name: body
  /PerformInspection/{CaseID}:
    put:
      summary: PerformInspection
      description: >-
        This operation transfers the council's perform inspection information on
        the Building Information Certificate case from the council's IT system.
        This operation represents the Certficiate Decision action from UI. 
      operationId: put-performinspection-Caseid
      parameters:
        - name: CaseID
          in: path
          description: A fully qualified application number or case id
          required: true
          schema:
            type: string
        - name: OrganisationID
          in: header
          description: >-
            The council LGA name or Private Certifier Organisation name to
            indicate where the request is originated from.
          required: true
          schema:
            type: string
      requestBody:
        description: Information request object
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/performInspection'
        required: true
      responses:
        '200':
          description: Case Performed
          content: {}
        '400':
          description: Invalid request supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Case not found or locked by another user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      deprecated: false
      x-codegen-request-body-name: body
  /CompleteInspection/{CaseID}:
    put:
      summary: CompleteInspection
      description: >-
        This operation transfers the council's inspection completion information
        on the Building Information Certificate case from the council's IT
        system to the Online Building Information Certificate Service.
      operationId: put-completeinspection-Caseid
      parameters:
        - name: CaseID
          in: path
          description: A fully qualified application number or case id
          required: true
          schema:
            type: string
        - name: OrganisationID
          in: header
          description: >-
            The council LGA name or Private Certifier Organisation name to
            indicate where the request is originated from.
          required: true
          schema:
            type: string
      requestBody:
        description: Information request object
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/completeInspection'
        required: true
      responses:
        '200':
          description: Case Completed
          content: {}
        '400':
          description: Invalid request supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Case not found or locked by another user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      deprecated: false
      x-codegen-request-body-name: body
  /Determination/{CaseID}:
    put:
      summary: Determination
      description: >-
        This operation transfers the council's Determination decision to Issue
        or Refuse the Building Information certificate case from the council's
        IT system to the Online Building Information certificate Service.
      operationId: put-determination-caseid
      parameters:
        - name: CaseID
          in: path
          description: A fully qualified application number or case id
          required: true
          schema:
            type: string
        - name: OrganisationID
          in: header
          description: >-
            The council LGA name to indicate where the request is originated
            from.
          required: true
          schema:
            type: string
      requestBody:
        description: Information request object
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/determination'
        required: true
      responses:
        '200':
          description: Case Determined Sucessfully
          content: {}
        '400':
          description: Invalid request supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Case not found or locked by another user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      deprecated: false
      x-codegen-request-body-name: body
  /DeferDetermination/{CaseID}:
    post:
      summary: DeferDetermination
      description: >-
        This operation transfers the council's Defer Determination information
        on the Building Information Certificate case from the council's IT
        system to the Online Building Information Certificate Service.
      operationId: put-DeferDetermination-caseid
      parameters:
        - name: CaseID
          in: path
          description: A fully qualified application number or case id
          required: true
          schema:
            type: string
        - name: OrganisationID
          in: header
          description: >-
            The council LGA name to indicate where the request is originated
            from.
          required: true
          schema:
            type: string
      requestBody:
        description: Information request object
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/deferDetermination'
        required: true
      responses:
        '200':
          description: CaseID--XXX created Sucessfully.
          content: {}
        '400':
          description: Invalid request supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Case not found or locked by another user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      deprecated: false
      x-codegen-request-body-name: body
  /CloseDeferDetermination/{CaseID}:
    put:
      summary: CloseDeferDetermination
      description: >-
        This operation transfers the council's Close Defer Determination
        information on the Building Information Certificate case from the
        council's IT system to the Online Building Information Certificate
        Service.
      operationId: put-CloseDeferDetermination-caseid
      parameters:
        - name: CaseID
          in: path
          description: A fully qualified application number or case id
          required: true
          schema:
            type: string
        - name: OrganisationID
          in: header
          description: >-
            The council LGA name to indicate where the request is originated
            from.
          required: true
          schema:
            type: string
      requestBody:
        description: Information request object
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/closeDeferDetermination'
        required: true
      responses:
        '200':
          description: CaseID--XXX created Sucessfully.
          content: {}
        '400':
          description: Invalid request supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Case not found or locked by another user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      deprecated: false
      x-codegen-request-body-name: body
components:
  schemas:
    error:
      required:
        - errorCode
        - statusCode
      type: object
      properties:
        statusCode:
          type: integer
          example: 404
        message:
          type: string
          example: Internal Server error 19876
        activityId:
          type: string
          example: 00000011-0ab-xy00-0000-500000000000
        errorCode:
          type: string
          example: DPE_TMS01
        errorDetails:
          type: string
          example: Inner Exceptions, Stack Trace, etc
    downloadableDocument:
      required:
        - documentName
        - documentType
        - documentURL
        - uploadedDateTime
      type: object
      properties:
        documentName:
          maxLength: 150
          type: string
          description: document name has to be appended with file extension
          example: test.docx
        documentType:
          maxLength: 100
          type: string
        uploadedDateTime:
          type: string
          format: date-time
        documentURL:
          maxLength: 500
          type: string
          description: URL of the document to be downloaded
          format: url
    completeInspection:
      required:
        - childCaseID
        - declarations
        - isFurtherInspectionRequired
        - issueInspectionResultSheet
        - updatedByEmail
      type: object
      properties:
        childCaseID:
          type: string
          description: >-
            Inspection case Id linked to the Building Information Certificate
            case.
        issueInspectionResultSheet:
          type: boolean
          description: To capture if the inspection sheet can be issued.
        isFurtherInspectionRequired:
          type: boolean
          description: Is the further inspection required
        declarations:
          type: array
          description: >-
            This is to track the declarations for inspection result. Required
            for Building Information Certificate, declaration for inspection
            result.
          items:
            $ref: '#/components/schemas/declarationsForInpection'
        Documents:
          type: array
          description: Mandatory when issueInspectionResultSheet is true
          items:
            $ref: '#/components/schemas/downloadableDocument'
        updatedByEmail:
          maxLength: 250
          type: string
          description: User must be registered in the planning portal
          example: john.smith@gmail.com
    initiateInspection:
      required:
        - inspectionType
        - updatedByEmail
      type: object
      properties:
        inspectionType:
          type: array
          description: type of inspection, Required for all types of certificates.
          items:
            $ref: '#/components/schemas/inspectionType'
        inspectionDescription:
          maxLength: 512
          type: string
          description: >-
            description of inspection, required for for Building Information
            Certificate.
        updatedByEmail:
          maxLength: 250
          type: string
          description: User must be registered in the planning portal
          example: john.smith@gmail.com
    declarationsForInpection:
      type: string
      description: >-
        This is to track the declarations. One of the below mentioned values
        must be selected. 1. I confirm that I have inspected the site subject of
        this application.
      example: Refer to description for values.
    determination:
      required:
        - Documents
        - applicationDecision
        - determinationDate
        - updatedByEmail
      type: object
      properties:
        applicationDecision:
          type: string
          description: >-
            To check whether the certificate is approved or refused.  This is a
            mandatory field. 1. Issued 2. Refused
          example: Refer to description for values.
        determinationDate:
          type: string
          description: >-
            This indicates the building Information Certificate application's
            Determination Date. It is applicable for both Approved and refused
            actions. Only future date to be provided as a value for this field.
            This is a mandatory attribute.
          format: date
          example: '2021-09-21'
        Documents:
          type: array
          items:
            $ref: '#/components/schemas/downloadableDocument'
        updatedByEmail:
          maxLength: 250
          type: string
          description: User must be registered in the planning portal
          example: john.smith@gmail.com
    deferDetermination:
      required:
        - updatedByEmail
        - workDescription
      type: object
      properties:
        workDescription:
          maxLength: 1000
          type: string
          description: Details of the work description which will be provide to applicant.
        dueDate:
          type: string
          description: Due date for required works
          format: date
          example: '2021-09-21'
        Documents:
          type: array
          items:
            $ref: '#/components/schemas/downloadableDocument'
        updatedByEmail:
          maxLength: 250
          type: string
          description: User must be registered in the planning portal
          example: john.smith@gmail.com
    assessment:
      required:
        - updatedByEmail
      type: object
      properties:
        siteInspectedDate:
          type: string
          description: >-
            This indicates the date on which the site inspection was completed.
            This field does not accept the future dates.
          format: date
          example: '2020-12-30'
        updatedByEmail:
          maxLength: 250
          type: string
          description: User must be registered in the planning portal
          example: john.smith@gmail.com
    performInspection:
      required:
        - Documents
        - childCaseID
        - inspectionCompletedDate
        - inspectionResult
        - updatedByEmail
      type: object
      properties:
        childCaseID:
          type: string
          description: >-
            Inspection case Id linked to the Building Information Certificate
            case.
        inspectionType:
          type: array
          description: type of inspection
          items:
            $ref: '#/components/schemas/inspectionType'
        inspectionCompletedDate:
          type: string
          description: Date of the Inspection was completed.
          format: date
        inspectionResult:
          type: string
          description: >-
            InspectionResult as part of perform inspection. 1. Works are
            satisfactory 2. Work has minor defects but is satisfactory 3. Works
            are not satisfactory
          example: Refer to description for values.
        peformInspectionComments:
          maxLength: 512
          type: string
          description: >-
            To hold the User entered comments.Optional Field for all certificate
            types.
        Documents:
          type: array
          items:
            $ref: '#/components/schemas/downloadableDocument'
        updatedByEmail:
          maxLength: 250
          type: string
          description: User must be registered in the planning portal
          example: john.smith@gmail.com
    inspectionType:
      type: string
      description: Type of Inspection 1.preliminary Inspection 2.Other Inspection
      example: Refer to description for values.
    closeDeferDetermination:
      title: Close DeferDetermination
      required:
        - childCaseID
        - updatedByEmail
      type: object
      properties:
        childCaseID:
          type: string
          example: DEF-XXXX
        updatedByEmail:
          maxLength: 250
          type: string
          description: User must be registered in the planning portal
          example: john.smith@gmail.com
    acceptReturn:
      required:
        - reviewOutcome
        - updatedByEmail
      type: object
      properties:
        reviewOutcome:
          type: string
          description: >-
            This is to track the outcome of council's update on completeness
            check, Accept application for assessment or return application. 1.
            Accept application for assessment 2. Return application
          example: Refer to description for values.
        councilComments:
          maxLength: 100
          type: string
          description: >-
            Comments for Building Information Certificate.  Applicable when
            reviewOutcome is Accept application for assessment
        councilUniqueIDNumber:
          maxLength: 128
          type: string
          description: >-
            Required Council unique identification number. Applicable when
            reviewOutcome is Accept application for assessment
        isFeePaid:
          type: boolean
          description: >-
            Required Property captures if applicant had paid the fee or not. 
            Applicable when reviewOutcome is Accept application for assessment
        totalFeePaid:
          type: number
          description: >-
            Total fee paid by applicant. Applicable when reviewOutcome is Accept
            application for assessment
          format: decimal
          example: 1250.9
        lodgementDate:
          type: string
          description: >-
            Required to Enter the date the application was lodged into the
            council system. Applicable when reviewOutcome is Accept application
            for assessment. Future date is not allowed to be entered.
        Documents:
          type: array
          items:
            $ref: '#/components/schemas/downloadableDocument'
        returnReason:
          maxLength: 512
          type: string
          description: >-
            Required to enter Reason for council to return the applicaion.
            Applicable when reviewOutcome is Return application
        updatedByEmail:
          maxLength: 250
          type: string
          description: User must be registered in the planning portal
          example: john.smith@gmail.com
  securitySchemes:
    api_key:
      type: apiKey
      name: api-key
      in: header
